#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdio.h>

int main() {
    char arr[10] = { 0 };
    scanf("%s", arr);

    char* p = &arr;
    int count = 0;
    while (*p)
    {
        count++;
        p += 1;
    }

    p = &arr;
    while (*p)
    {
        if ((count - 1) % 3 == 0 && *(p + 1) != 0)
        {
            printf("%c", *p);
            printf(",");
        }
        else
        {
            printf("%c", *p);
        }

        count--;
        p += 1;
    }
}